<template>
  <el-carousel :interval="40000" type="card" height="300px" style="width: 90%;margin: 0 auto" ref="carousel">
    <el-carousel-item v-for="(item,index) in recrulist" :key="index" >
      <img :src="item.img" alt=""/>
    </el-carousel-item>
  </el-carousel>
</template>

<script setup>
import {ref} from "vue";
import {getAllRecruitment} from "@/api/recruitment";

const recrulist = ref({})
const carousel = ref(null)

getAllRecruitment().then(res=>{
  if (res.code === 20041){
    recrulist.value = res.data
    recruthree.value = recrulist.value[0]
  }else {
    ElMessage({
      message: '获取信息失败',
      type: 'error',
    })
  }
})
</script>

<style scoped>

</style>